/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package campussmartsecurity;
import java.sql.*;
/**
 *
 * @author brlnt
 */
public class Konek {
 protected String db="jdbc:mysql://localhost/css";
    protected String user="root";
    protected String pass="";
    protected Connection con;
    protected Statement stmt;
    protected ResultSet rs;
    
    public Konek(){
       try{
            Class.forName("com.mysql.jdbc.Driver");
            con=DriverManager.getConnection(db,user, pass);
            stmt=con.createStatement();
            setStatus("Connection Succeed");
        }catch(Exception e){
            setStatus("Connect Fail");
            System.out.println(e);
        } 
    }  
    String status;
    public void setStatus(String s){
        status = s;
    }
    
    public String getStatus(){
        return status;
    }
    
}
